					<div class="page-toolbar">
						<div class="btn-group pull-right">
											<?php echo form_open('admin/events/search_by')?>
													<select name="search_by" id="events" class="select2_category form-control" data-placeholder="Choose a Category" tabindex="1">
														<option value="">select</option>
														<?php foreach($event_fields as $event_k => $event_v):?>
														<?php if($event_k !== 'event_location'):?>
														<?php if($search_by == $event_k):?>
														<option selected="selected" value="<?php echo $event_k;?>"><?php echo $event_v;?></option>
														<?php else:?>
														<option value="<?php echo $event_k;?>"><?php echo $event_v;?></option>
													<?php endif; endif; endforeach;?>
													</select><?php echo form_error('search_by');?>
													<input type="text" value="<?php if($search_by !== 'status'): echo $search_by_value; else: echo ''; endif; ?>" name="search" id="events_search" class="form-control" placeholder="search"/>
											<select name="status" id="events_status" class="select2_category form-control" data-placeholder="Choose a Category" tabindex="1">
												<option value="">select</option>
												<?php foreach($status as $status_k=>$status_v):?>
												<?php if($search_by == 'status' && $search_by_value == $status_k): ?>
													<option selected="selected" value="<?php echo $status_k;?>"><?php echo $status_v;?></option>
												<?php else:?>
													<option value="<?php echo $status_k;?>"><?php echo $status_v;?></option>
												<?php endif; endforeach;?>
											</select><?php echo form_error('search_by');?>
												<input type="submit" class="btn blue" value="Search"/>
										<?php echo form_close();?>
							</ul>
						</div>
					</div>
				</div>
				<!-- END PAGE HEADER-->
				<!-- BEGIN PAGE CONTENT-->
				<div class="row">
					<div class="col-md-12">
						<!-- BEGIN EXAMPLE TABLE PORTLET-->
						<div class="portlet box blue">
							<div class="portlet-title">
								<div class="caption">
									<i class="fa fa-edit"></i>Business Table
								</div>
								<div class="tools">
									<a href="javascript:;" class="collapse">
									</a>
									<a href="#portlet-config" data-toggle="modal" class="config">
									</a>
									<a href="javascript:;" class="reload">
									</a>
									<a href="javascript:;" class="remove">
									</a>
								</div>
							</div>
							<div class="portlet-body">
								<div class="table-toolbar">
									<div class="row">
										<div class="col-md-6">
											<div class="btn-group">
												<a href="<?php echo base_url().'index.php/admin/events/create_events';?>"><button id="sample_editable_1_new" class="btn green">
												Add New <i class="fa fa-plus"></i>
												</button></a>
											</div>
										</div>
										<?php if($error == 1){
											echo "No records Found <br>";
											echo anchor('admin/events/index','Back');
										}else{ ?>
										
									</div>
								</div>
								<table class="table table-striped table-hover table-bordered" id="sample_editable_1">
								<thead>
								<tr>
								<?php foreach($event_fields as $event_k => $event_v):?>
									<th>
										 <?php if($event_k !== 'event_location'):
										 echo anchor('admin/events/index/'.$query_id.'/'.$event_k.'/'.(($sort_order == 'asc' && $order_by == $event_k) ? 'desc' : 'asc'), $event_v);
										 else: echo $event_v; endif;?>
									</th>
									<?php endforeach;?>
									<th>
										 Edit
									</th>
									<th>
										 Delete
									</th>
								</tr>
								</thead>
								<tbody>
								<?php echo 'Total Records: '.$event_all_events->total;?>
								<?php //echo '<pre>';print_r($event_all_events);exit;?>
								<?php foreach($event_all_events->info as $events):?>
								<tr>
									<td>
										 <?php echo $events->event_title;?>
									</td>
									<td>
										 <?php echo anchor('','View Location');?>
									</td>
									<td>
										 <?php if($events->status == 1){?>
										 <i class="fa fa-check"></i>
										 <?php }else{ ?>
										 <i class="fa fa-times"></i>
										  <?php } ?>
									</td>
									<td>
										<a class="edit" href="<?php echo base_url().'index.php/admin/events/edit_events/'.$events->event_id;?>">
										Edit </a>
									</td>
									<td>
										<a class="delete" href="<?php echo base_url().'index.php/admin/events/delete_events/'.$events->event_id.'/'.$events->status;?>">
										<?php if($events->status == 1){?>
										 Delete
										 <?php }else{ ?>
										 Active
										  <?php } ?></a>
									</td>
								</tr>
								<?php endforeach;?>
								
							</table>
							<?php echo $pagination;?>
						<!-- END EXAMPLE TABLE PORTLET-->
					</div>
				</div>
			<?php }?>